<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>const常量 test</title>
</head>
<body></body>
<script>
    // 常量声明
    const SCHOOL = '尚学堂'
    //1.一定要给初始值
    //2.常量一般要大写
    //3.常量不能修改
    //4.块级作用域
    {
        const NAME = '张涛'
        //可以获取
        console.log(NAME)
    }
    //获取不到
    console.log(NAME)
    //5.对于数组的元素或对象的属性做修改，不会报错
    const ARR = ['张涛','老朱','齐悦']
    ARR.push('刘俊才')
    //6.声明数组或对象用const
</script>
</html>